#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
#include <QPushButton>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    this->setWindowTitle("窗口标题");
    qDebug()<<this->windowTitle();
    QPushButton* button = new QPushButton();
    button->setText("按下");
    button->setWindowTitle("按钮标题");   //这里不应该给按钮设置windowTitle，但是也没有报错
}

Widget::~Widget()
{
    delete ui;
}

